<?php
/*
 * This view is called by the skeleton controller
 * which is used to generate a simple and isolated showcase for an add-on.
 * It is why some stuffs have to be loaded or be defined directly in the view here.
 *
 * In this case, if you want to use Ion auth library for your project,
 * the Authentication library should be loaded in MY_Controller or autoload config.
 */
$this->load->library('authentication');
?>
<?php $user = $this->authentication->user()->row(); ?>
<?php if ( ! empty($user)): ?>
<h3>Account Info</h3>
<p>
<?php foreach (array('id', 'email', 'first_name', 'last_name') as $field): ?>
    <?php echo '<b>' . $field . ':</b> ' . $user->$field . '<br>'; ?>
<?php endforeach; ?>
</p>
<?php endif; ?>